package prassein.rsm.dao.base;

import java.util.List;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import prassein.rsm.common.orm.hibernate3.HibernateDao;
import prassein.rsm.entity.base.Audit;
import prassein.rsm.entity.base.Resume;

/**
 * 角色管理
 * @author 菠萝大象
 */
@Repository
@Transactional
public class ResumeDao extends HibernateDao<Resume>{

	public List<Resume> getResumes(){
		return super.getAll();
	}
	
	public void save(Resume resume) {
		super.save(resume);
	}
	
	public List<Resume> getAllDesc() {
		return query();
	}

	public List<Resume> query(final Criterion... criterions) {
		return createCriteria(criterions).addOrder( Order.desc("id") ).list();
	}
	
}
